package com.unionftech.content_login.bean

import android.os.Parcel
import android.os.Parcelable

data class RemoteLoginWarning(
    val city: String,
    val country: String,
    val deviceType: String,
    val ipAddress: String,
    val loginTime: String,
    val province: String
) : Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString().toString(),
        parcel.readString().toString(),
        parcel.readString().toString(),
        parcel.readString().toString(),
        parcel.readString().toString(),
        parcel.readString().toString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(city)
        parcel.writeString(country)
        parcel.writeString(deviceType)
        parcel.writeString(ipAddress)
        parcel.writeString(loginTime)
        parcel.writeString(province)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<RemoteLoginWarning> {
        override fun createFromParcel(parcel: Parcel): RemoteLoginWarning {
            return RemoteLoginWarning(parcel)
        }

        override fun newArray(size: Int): Array<RemoteLoginWarning?> {
            return arrayOfNulls(size)
        }
    }
}